import React from 'react';
import { connect, history } from 'umi';
import ParameterForms from './ParameterForms';
import { Button, Tooltip } from 'antd';
import { InfoCircleFilled } from '@ant-design/icons';
import styles from './index.less';
@connect(({ SensitivityAnalysis }) => ({
  SensitivityAnalysis,
}))
export default class extends React.Component {
  forms = {};
  componentDidMount = () => {};

  getSceneSimulatorData = () => {
    this.compThis.getData();
  };
  render() {
    return (
      <div className={styles.ParameterSimulation}>
        <div className={styles.member}>
          <div className={styles.title}>
            <div className={styles.text}>场景模拟器</div>
            <Tooltip title="预载历史数据后，可调整参数并模拟">
              <span className={styles.infoIcon}>
                <InfoCircleFilled />
              </span>
            </Tooltip>
          </div>
          <Button
            type="primary"
            style={{ width: '100%', marginTop: 16, marginBottom: 12 }}
            onClick={() => {
              this.getSceneSimulatorData();
            }}
          >
            开始模拟
          </Button>
        </div>
        {/* 参数forms */}
        <ParameterForms init={compThis => (this.compThis = compThis)} />
      </div>
    );
  }
}
